﻿using System.Globalization;
using System.Windows.Data;

namespace Lib.WPF.Core {
    /// <summary>
    /// 
    /// </summary>
    public class ActualHeightConverter : IValueConverter {
        /// <summary>
        /// 
        /// </summary>
        public object Convert(object Value, Type TargetType, object Parameter, CultureInfo Culture) {
            if (Value is double Height && Height > 0) {
                return Height;
            }
            return 0;
        }
        /// <summary>
        /// 
        /// </summary>
        public object ConvertBack(object Value, Type TargetType, object Parameter, CultureInfo Culture) {
            throw new NotImplementedException();
        }
    }
}
